//
//  FavCell.m
//  ios_news
//
//  Created by Han on 14-7-22.
//  Copyright (c) 2014年 ucoder. All rights reserved.
//

#import "FavCell.h"

@implementation FavCell
@synthesize titleLb = _titleLb, timeLb = _timeLb;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        
        [self drawView];
    }
    return self;
}

- (void) drawView
{
    _titleLb = [[UILabel alloc]initWithFrame:CGRectMake(17, 5, 320-2*17, 45)];
    _titleLb.textAlignment = NSTextAlignmentLeft;
    _titleLb.font = [UIFont systemFontOfSize:16.0];
    _titleLb.textColor = [UIColor blackColor];
    _titleLb.numberOfLines = 3;
    [_titleLb setBackgroundColor:[UIColor clearColor]];
    [_titleLb setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
    //titleLb.text = @"美、乌情报机构：乌分裂势力误击马航客机 俄罗斯是“帮凶”";
    [self.contentView addSubview:_titleLb];
    
    //添加时间
    _timeLb = [[UILabel alloc]initWithFrame:CGRectMake(self.contentView.frame.size.width-190, _titleLb.frame.size.height+_titleLb.frame.origin.y, 180, 20-0.5)];
    [_timeLb setTextAlignment:NSTextAlignmentRight];
    [_timeLb setBackgroundColor:[UIColor clearColor]];
    _timeLb.font = [UIFont systemFontOfSize:12.0f];
    //[self.contentView setBackgroundColor:[UIColor redColor]];
    [_timeLb setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
    [self.contentView addSubview:_timeLb];
}


@end
